package ezXpns.tests;

import static org.junit.Assert.*;

import java.util.UUID;

import static org.mockito.Mockito.mock;

import org.junit.Before;
import org.junit.Test;

import ezXpns.BudgetChange;
import ezXpns.analysis.Aggregator;
import ezXpns.analysis.aggregators.Count;


//@author A0086934R
public class CountTest {

	@Before
	public void setUp() {
		AggregatorMock = mock(Aggregator.class);
	}
	
	@Test
	public void testConstructor() {
		Count C1 = new Count();
		
		assertNotNull(C1);
	}
	
	@Test
	public void test() {
		Count C2 = new Count();
		UUID U2 = new UUID(4242L, 0L);
		BudgetChange BC2 = new BudgetChange();
		
		C2.addEntry(U2, BC2);
		assertTrue(C2.getResult() == 1);

		C2.removeEntry(U2, BC2);
		assertTrue(C2.getResult() == 0);
	}

	Aggregator AggregatorMock;
}
